package com.外观模式;

/**
 * 接待人员
 * @author Fang Ruichuan
 * @date 2022-12-14 21:57
 */
public class Receptionist {
    private InternalMedicine inner;
    private Ophthalmology eye;
    private Surgical out;

    public Receptionist() {
        inner = new InternalMedicine();
        eye = new Ophthalmology();
        out = new Surgical();
    }

    public void say(String message) {
        if ("我要体验".equals(message)) {
            this.goHere();
        }
    }

    public void goHere() {
        System.out.println("欢迎来到我们体验中心！！！体验项目在那，去吧~");
        inner.here();
        eye.here();
        out.here();
    }

    public static void main(String[] args) {
        Receptionist receptionist = new Receptionist();
        receptionist.say("我要体验");
    }
}

// 内科
class InternalMedicine {
    public void here() {
        System.out.println("内科未见异常");
    }
}

// 眼科
class Ophthalmology {
    public void here() {
        System.out.println("眼科注意保养");
    }
}

// 外科
class Surgical {
    public void here() {
        System.out.println("外科未见异常");
    }
}
